<!DOCTYPE html>
<html>
<head>
<title>用户积分记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../../include/resources.html">
<script type="text/javascript">
	var dataGrid;
	$(function() {
		dataGrid = $('#dataGrid').datagrid({
			url : 'list.html',
			fit : true,
			fitColumns : true,
			border : false,
			pagination : true,
			idField : 'id',
			pageSize : pageSize,
			pageNums :1,
			pageList : pageList,
			sortName : 'id',
			sortOrder : 'desc',
			checkOnSelect : false,
			selectOnCheck : false,
			nowrap : false,
			singleSelect:true,
			columns : [[ 			
				{ field: 'id', title: '编号', width: 50,sortable:true},
				{ field: 'userName', title: '用户名', width: 80},
				{ field: 'scoreTypeName', title: '类型', width: 100},
				{ field: 'behavior', title: '行为', width: 50,
					formatter: function(value,row,index){
						if (value == 1){
							return "获取";
						} else if (value == 2){
							return "消耗";
						}
					}
				},
				{ field: 'score', title: '操作积分', width: 90},
				{ field: 'validScore', title: '有效积分', width: 90},
				{ field: 'freezeScore', title: '冻结积分', width: 90},
				{ field: 'addTime', title: '添加时间', width: 150,
					formatter: function(value,row,index){
						return getLocalTime(value,4);
					}
				},
				{ field: 'addIp', title: '添加IP', width: 100},
				{ field:'remark', title:'备注',width: 150}
			]],
			toolbar : '#toolbar',
			onLoadSuccess : function() {
				$('#searchForm table').show();
				parent.$.messager.progress('close');
			}
		});
	});
</script>
</head>
<body style="padding:0 20px;" >
	<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',border:false,collapsible:false" id="searchBox">
        	<div class="sLeft">
	            <form id="searchForm">
	            	<input type="text" name="searchName" class="sInput" placeholder="输入用户名进行搜索" autocomplete="off" onkeydown="if(event.keyCode == 13){ $.fn.dataGridOptions.searchFun('#searchForm');return false;}"/><a href="javascript:;" title="查询" class="sBtn" onclick="$.fn.dataGridOptions.searchFun('#searchForm');">查询</a><a href="javascript:;" class="advBtn" title="条件查询">条件查询 <i class="iconfont">&#xe638;</i></a>
	            	<a href="javascript:void(0);" class="reloadIcon" onclick="dataGrid.datagrid('reload');" title="刷新" ><i class="iconfont">&#xe603;</i></a>
	            </form>
            </div>
            <form id="showAdw" autocomplete="off">
		        <ul class="showAdw" style="display:none;">
		        	<a href="javascript:void(0);"><i class="iconfont closeWin">&#xe628;</i></a>
		        	<li><span>用户名</span><input type="text" name="userName" id="userName"/></li>
		        	<li><span>类型</span><input type="text" name="scoreTypeName" id="scoreTypeName"/></li>
		        	<li><span>行为</span><select id="behavior" name="behavior" >
							<option value="99">全部</option>
							<option value="1">获取</option>
							<option value="2">消耗</option>
						</select></li>
		        	<li><span>添加时间</span><input type="text" name="startTime" id="startTime" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}',readOnly:true})" class="searchTime"/>&nbsp;-&nbsp;<input type="text" name="endTime" id="endTime" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}',readOnly:true})" class="searchTime"/></li>
		       		<li><span></span><a href="javascript:void(0);" class="searchBtn sureBtn" onclick="$.fn.dataGridOptions.searchFun('#showAdw');">确定</a><a href="javascript:void(0);" class="searchBtn" onclick="$.fn.dataGridOptions.cleanFun('#searchForm');">重置</a></li>
		        </ul>
	        </form>
		</div>
		<div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
			<table id="dataGrid"></table>
		</div>
	</div>
</body>
</html>
<script src="${theme_dir}/js/search.js"></script>